package com.xuedian.xuanxuan.web.dao;


import com.xuedian.xuanxuan.core.generic.GenericDao;
import com.xuedian.xuanxuan.web.model.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MUserMapper extends GenericDao<User, Long> {

    int deleteByPrimaryKey(Long id);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    /**
     * 根据OpenId查询用户
     * @param openId
     * @param type
     * @return
     */
    List<User> selectByOpenId(@Param("openId") String openId, @Param("type") Integer type);

    /**
     * 根据userId查询用户
     * @param userId
     * @return
     */
    List<User> selectInfo(@Param("userId") Long userId);
}